<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title>商城商城商品列表</title>
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../css/app.css" />
	<link rel="stylesheet" type="text/css" href="../../css/swiper.min.css" />
	<style type="text/css">
		body {
			background-color: #f5f5f5;
		}
		/*头部区域*/

		.btn-img-share {
			width: 1.3rem;
			padding-top: 0.5rem;
		}

		.aui-tab-item {
			color: #222222;
		}

		.aui-tab-item.active {
			/*color: #72D5EF;*/
		}

		.aui-tab-item.active:after {
			content: '';
			position: absolute;
			width: 1.4rem;
			bottom: -1px;
			height: 2px;
			left: 50%;
			margin-left: -0.7rem;
			background-color: #72D5EF;
		}
		/*轮播*/

		.swiper-slide img {
			width: 100%;
			object-fit: cover;
		}

		.swiper-pagination {
			width: 2.4rem;
			background-color: rgba(255, 255, 255, 0.76);
			color: #999999;
			font-size: 0.75rem;
			right: 0.75rem;
			left: auto;
			border-radius: 1.2rem;
			bottom: 0.75rem;
		}
		/*活动信息条*/

		.goods-active-content {
			display: flex;
			padding: 0 0.5rem;
			justify-content: space-between;
			align-items: center;
			height: 2.5rem;
			font-size: 0.65rem;
			color: #FFFFFF;
		}
		/*进度条*/

		.aui-progress.sm,
		.aui-progress-sm,
		.aui-progress.sm .aui-progress-bar,
		.aui-progress-sm .aui-progress-bar {
			border-radius: 0.5rem;
		}

		.aui-progress-sm {
			background-color: #FFFFFF;
			/*margin: 0.2rem 0;*/
		}

		.aui-progress-bar {
			/*background-color: #FF3862;*/
			background: linear-gradient(135deg, rgba(227, 234, 86, 1) 0%, rgba(162, 225, 58, 1) 100%, rgba(122, 174, 229, 1) 100%);
		}
		/*商品信息*/

		.goods-tag {
			font-size: 0.75rem;
			color: #FFFFFF;
			border-radius: .15rem;
			padding: 0.1rem 0.2rem;
		}

		.goods-info-title:after {
			content: '';
			position: absolute;
			background-color: #690078;
			width: .1rem;
			left: 0;
			height: 0.7rem;
			margin-top: 0.1rem;
		}

		.group-join-list-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0.75rem 0;
		}

		.ping-star {
			display: inline-block;
			height: 0.9rem;
			margin-left: 0.3rem;
		}

		.aui-row-padded [class*=aui-col-xs-] {
			padding: 0.25rem;
		}

		.shop-comment {
			position: relative;
			font-size: 0.7rem;
			background-color: #F5F5F5;
			color: #999999;
			margin: 0.25rem;
			margin-top: 0.5rem;
			padding: 0.5rem;
			border-radius: 0.25rem;
		}

		.shop-comment:before {
			content: '';
			position: absolute;
			width: 0;
			height: 0;
			border-left: .45rem solid transparent;
			border-right: .45rem solid transparent;
			border-bottom: .7rem solid #F5F5F5;
			top: .65rem;
			left: .75rem;
		}
		/*底部*/

		.aui-bar-tab-item img {
			display: inline-block;
			width: 1.1rem;
		}

		.aui-bar-tab .aui-bar-tab-item {
			height: 2rem;
		}

		.aui-bar-tab .aui-bar-tab-label {
			display: block;
			font-size: 0.6rem;
			position: initial;
			line-height: 0.5;
		}

		.fade-enter-active,
		.fade-leave-active {
			/*transition: opacity 0.1s linear;*/
		}

		.fade-enter,
		.fade-leave-to
		/* .fade-leave-active below version 2.1.8 */

		{
			/*opacity: 0;*/
		}

		.attr-tag {
			height: 1.5rem;
			line-height: 1.5rem;
			display: inline-block;
			padding: 0 1rem;
			border-radius: 1rem;
			box-sizing: border-box;
			/*border: 1px solid #e6e6e6;*/
			color: #323233;
			background-color: #f6f6f6;
			font-size: 0.65rem;
			margin-right: 0.75rem;
			margin-bottom: 0.75rem;
		}

		.attr-tag.active {
			color: #fff;
			/*border-color: #FE0000;*/
			background: linear-gradient(135deg, rgba(132, 229, 255, 1) 0%, rgba(107, 180, 255, 1) 100%, rgba(122, 174, 229, 1) 100%);
		}

		.aui-btn-plus {
			/*border: 1px solid #999999;*/
			/*border-radius: 50%;*/
			width: 1rem;
			height: 1rem;
			line-height: 1.2;
			color: #999999;
			font-size: 1rem;
		}

		.service_name_view:after {
			content: '/';
		}

		.service_name_view:last-child:after {
			content: '';
		}

		@font-face {
			font-family: 'iconfont';
			src: url('../../image/icon/addicon/iconfont.eot');
			src: url('../../image/icon/addicon/iconfont.eot?#iefix') format('embedded-opentype'), url('../../image/icon/addicon/iconfont.woff') format('woff'), url('../../image/icon/addicon/iconfont.ttf') format('truetype'), url('../../image/icon/addicon/iconfont.svg#iconfont') format('svg');
		}

		.iconfont {
			font-family: "iconfont" !important;
			font-size: 16px;
			font-style: normal;
			-webkit-font-smoothing: antialiased;
			-webkit-text-stroke-width: 0.2px;
			-moz-osx-font-smoothing: grayscale;
		}
		
	</style>
</head>

<body>
	<!--<div id="app" v-cloak :style="attr_show||serve_show?'height:100vh;overflow:hidden;': ''">-->
	<div id="app" v-cloak>
		<div id="aui-header" style="position: fixed;z-index: 990;top: 0;width: 100%;" :class="{'ming-bg-white':scrolled}">
			<transition name="fade">
				<header v-if="scrolled" class="aui-bar aui-bar-nav ming-bg-blue aui-border-b">
					<a class="aui-pull-left" tapmode onclick="close_win()">
						<img class="btn-img-back" src="../../image/btn/btn-back-2.png" style="transform:translateX(.5rem);width:1.2rem;" />
					</a>
					<div class="aui-title ming-text-app">
						<div class="aui-tab">
							<div class="aui-tab-item" :class="{'active':index==0}" tapmode onclick="tapindex(0)" style="font-size:.9rem;">
								商品
							</div>
							<!-- <div class="aui-tab-item" :class="{'active':index==1}" tapmode onclick="tapindex(1)">
									评价
								</div> -->
							<div class="aui-tab-item" :class="{'active':index==1}" tapmode onclick="tapindex(1)" style="font-size:.9rem;">
								详情
							</div>
						</div>
					</div>
					<a class="aui-pull-right" tapmode onclick="openSharebox()">
						<img class="btn-img-share" src="../../image/btn/btn-share-2.png" style="width:1.2rem;transform:translateX(-.1rem);" />
					</a>
				</header>
			</transition>
			<transition name="fade">
				<header v-if="!scrolled" class="aui-bar aui-bar-nav" style="background-color:#fff;position:fixed;top:0px ">
					<!-- 返回 -->
					<a class="aui-pull-left" tapmode onclick="close_win()" style="transform:translateY(2rem);padding-left:.65rem;background-color:#Fff;width:50%;height:2.45rem;">
						<img style="padding-top: 0.6rem;" class="btn-img-back" src="../../image/btn/btn-back-2.png" />
					</a>

					<!-- 导航：商品==详情 -->
					<div class="aui-title ming-text-app" style="transform:translateY(2.25rem);">
						<div class="aui-tab">
							<div class="aui-tab-item" :class="{'active':index==0}" tapmode onclick="tapindex(0)" style="font-size:.9rem;">
								商品
							</div>
							<div class="aui-tab-item" :class="{'active':index==2}" tapmode onclick="tapindex(2)" style="font-size:.9rem;">
								详情
							</div>
						</div>
					</div>

					<!-- 分享 -->
					<a class="aui-pull-right" tapmode onclick="openSharebox()" style="transform:translateY(2.1rem);padding-right:.5rem;padding-left:3.5rem;background-color:#fff;width:28%;height:2.35rem;">
						<img style="padding-top: 0.6rem;" class="btn-img-share" src="../../image/btn/btn-share-2.png" />
					</a>
				</header>
			</transition>
		</div>

		<div>
			<!--轮播开始-->
			<div style="height: 18rem;overflow: hidden;position: relative;transform:translateY(90px);">
				<div class="swiper-container">
					<div class="swiper-wrapper">
						<div v-for="vo in goodsinfo.img" class="swiper-slide" style="display:inline-block;width:100%;height:14.5rem;">
							<img :src="vo" style="display:inline-block;width:100%;height:100%;vertical-align: middle;" />
						</div>
					</div>
				</div>
				<div class="swiper-pagination" style="transform:translateY(-4rem);background-color:rgba(0,0,0,.4);color:#fff;"></div>
			</div>

			<!-- <div>
					<div>视频</div>
					<div>图片</div>
				</div> -->

			<!-- 抢购内容 -->
			<div v-if="type=='miao'" class="goods-active-content aui-bg-linear" style="margin-top:1rem;position:relative;">
				<!-- <div>
						<span class="aui-font-size-10">￥<span style="font-size: 1rem;">{{price_format('yuan',goodsinfo.current_price)}}</span><span>.{{price_format('fen',goodsinfo.current_price)}}</span></span>
					</div>
					<div style="flex: 1;padding-left: 0.75rem;">
						<div style="opacity: 0.6;">
							<del style="font-size: 0.5rem;">￥{{goodsinfo.cost_price}}</del>
						</div>
						<div class="aui-font-size-10">
							已售：{{goodsinfo.sold_num}}件
						</div>
					</div> -->

				<!-- 商品详情页-已售进度条 -->
				<!-- <div v-if="miaoTime[tab_index].status=='已结束'|miaoTime[tab_index].status=='进行中'" class="aui-progress aui-progress-sm" style="background-color:#f6f6f6;height:.75rem;width:6rem;margin-top:.75rem;border:none;position:relative;color:#000;">
						<div class="aui-progress-bar" :style="{width: vo.sold_per+'%'}" style="background:linear-gradient(135deg,rgba(227,234,86,1) 0%,rgba(162,225,58,1) 100%,rgba(122,174,229,1) 100%);border-radius:.35rem;"></div>
						<div v-if="miaoTime[tab_index].status=='已结束'|miaoTime[tab_index].status=='进行中'" class=" " style="color:rgba(0,0,0,.4);font-size:.5rem;position:absolute;left:.4rem;">
							已售{{vo.sold_num}}件
						</div>
					</div> -->

				<!-- 已售进度条 -->
				<div style="position:absolute;left:.4rem;top:50%;transform:translateY(-50%);display:inline-block;width:9rem;height:.75rem;background-color:#fff;border-radius: 1.2rem;">
					<div class="aui-progress aui-progress-sm">
						<div class="aui-progress-bar" :style="{width: goodsinfo.sold_per+'%'}"></div>
					</div>
				</div>

				<div style="position:absolute;right:1rem;top:.7rem;font-size:.8rem;">
					<div>
						<span>距结束</span>&nbsp;
						<span v-html="settime(goodsinfo.miao_end_date,now_time)"></span>
						<!-- <span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">00</span>
							<span>:</span>
							<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">55</span>
							<span>:</span>
							<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">15</span> -->
					</div>
				</div>
			</div>

			<!-- 抢购提示栏 -->
			<div v-if="type=='tuan'" class="goods-active-content aui-bg-linear" style="position:relative;">
				<!-- <div>
						<span class="aui-font-size-10">￥<span style="font-size: 1rem;">{{price_format('yuan',goodsinfo.tuan_price)}}</span><span>.{{price_format('fen',goodsinfo.tuan_price)}}</span></span>
					</div> -->
				<!-- <div style="flex: 1;padding-left: 0.75rem;">
						<div style="opacity: 0.6;">
							<del style="font-size: 0.5rem;">￥{{goodsinfo.cost_price}}</del>
						</div>
						<div class="aui-font-size-10">
							已售：{{goodsinfo.sold_num}}件
						</div>
					</div> -->
				<div style="position:absolute;right:1rem;top:.7rem;font-size:.8rem;">
					<div>
						<span>距结束123</span>&nbsp;
						<!-- {{settime(goodsinfo.miao_end_date,now_time)}} -->
						<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">00</span>
						<span>:</span>
						<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">55</span>
						<span>:</span>
						<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">15</span>
					</div>
					<!-- <div>
							<div class="aui-progress aui-progress-sm">
								<div class="aui-progress-bar" :style="{width: goodsinfo.sold_per+'%'}"></div>
							</div>
						</div> -->
				</div>
			</div>
			<div class="goods-info">
				<div class="ming-bg-white aui-padded-l-10 aui-padded-r-10">
					<!-- 新品、热销、推荐-标题 -->
					<div class="aui-ellipsis-3" style=" padding-top: 0.75rem; position: relative;">
						<span v-if="goodsinfo.sign!=''" class="aui-bg-linear goods-tag" style="background:#F73024;border-radius:.1rem;">{{goodsinfo.sign}}</span>
						<strong class="aui-font-size-15">{{goodsinfo.title}}</strong>
					</div>
					<!-- 标价、快递栏 -->
					<div class="aui-info" style="position:relative;">
						<!-- <div v-if="type=='good'">
								<span class="aui-font-size-20" style="color: #FF6642;">￥<big>{{price_format('yuan',goodsinfo.current_price)}}</big><small>.{{price_format('fen',goodsinfo.current_price)}}</small><del class="aui-padded-l-10 aui-font-size-12 ming-text-hui">￥{{goodsinfo.cost_price}}</del></span>
							</div> -->

						<div style="color: #FF6642;font-weight:bolder;">
							<span class="aui-font-size-20">￥<span style="font-size: 1.5rem;">{{price_format('yuan',goodsinfo.current_price)}}</span><span class="aui-font-size-20">.{{price_format('fen',goodsinfo.current_price)}}</span></span>
						</div>

						<div style="flex: 1;padding-left: 0.75rem;margin-top:.5rem;">
							<div style="opacity: 0.6;">
								<del class="aui-font-size-16">￥{{goodsinfo.cost_price}}</del>
							</div>
						</div>

						<div class="ming-text-hui aui-font-size-14" style="position:absolute;right:.45rem;top:1.5rem;">
							快递：{{goodsinfo.exp_fee}}
						</div>
					</div>
				</div>

				<div style="margin-top:.5rem;margin-bottom:.5rem;">
					<!-- 服务 -->
					<div class="ming-bg-white aui-info aui-padded-l-10 aui-padded-r-10"  tapmode @click="serve_show=true">
						<div class="aui-font-size-13">
							<span class="ming-text-hui">服务&nbsp&nbsp&nbsp&nbsp</span>
							<span class="aui-text-default">
									<span class="service_name_view" v-for="vo in goodsinfo.service_name_view">{{vo}}</span>
							</span>
						</div>
						<div>
							<img style="height: 1.1rem;" src="../../image/btn/btn-right.png" />
						</div>
					</div>
					<!-- 规格 -->
					<div class="ming-bg-white aui-info aui-border-b aui-padded-l-10 aui-padded-r-10" tapmode @click="attr_show=true">
						<div class="aui-font-size-13">
							<span class="ming-text-hui">规格&nbsp&nbsp&nbsp&nbsp</span>
							<span v-for="vo in good_sku_view" class="aui-text-default aui-padded-r-5">{{vo}}</span>
						</div>
						<div>
							<img style="height: 1.1rem;" src="../../image/btn/btn-right.png" />
						</div>
					</div>
					<div>
					</div>
					<!--参团信息-->
					<div v-if="type=='tuan'" class="group-join-info ming-bg-white aui-margin-b-10 aui-padded-r-10 aui-padded-l-10">
						<!-- <div class="group-join-list">
						<div v-for="vo in goodsinfo.tuan_uid" class="group-join-list-item aui-border-b">
							<div>
								<img :src="vo.leader_avatar" class="aui-img-round" style="display: inline-block;height:2rem ;" />
							</div>
							<div class="aui-font-size-15 aui-text-default aui-padded-l-10" style="flex: 1;">
								<div>{{vo.leader_nickname}}</div>
								<div>
									<div class="aui-font-size-14" style="color: #999999;">
										<span>还差</span>
										<span style="color: #FC0000;">{{vo.un_join_tuan_num}}人</span>
										<span>成团</span>
										<span v-if="settime(vo.end_time,now_time)!='已结束'">还剩</span> <span v-html="settime(vo.end_time,now_time)"></span>
									</div>
								</div>
							</div> -->
						<!-- <div class="aui-padded-r-15">
								<div class="aui-font-size-14" style="color: #333333;">
									<span>还差</span>
									<span style="color: #FC0000;">{{vo.un_join_tuan_num}}人</span>
									<span>成团</span>
								</div>
								<div class="aui-font-size-12 ming-text-hui">
									<span v-if="settime(vo.end_time,now_time)!='已结束'">还剩</span> <span v-html="settime(vo.end_time,now_time)"></span>
								</div>
							</div> -->
						<!-- <div tapmode @click="if(vm.loginout) {openWin_login();return;};openWin_pintuan_details(vo.id)">
								<div class="aui-btn aui-bg-linear ming-text-white">
									去参团
								</div>
							</div>
						</div>
					</div> -->

						<div v-if="goodsinfo.tuan_uid.length>0" class="aui-text-center" tapmode @click="detial_show=true" style="display:inline-block;height:1.2rem;width:100%;">
							<div style="color: #999999; margin:1.25rem 0;">查看全部></div>
						</div>
					</div>
          <!-- 评价晒单  -->
					<div class="goods-ping ming-bg-white aui-margin-b-10 aui-padded-r-10 aui-padded-l-10" style="display: block;">
						<div class="aui-info" style="padding: 0.9rem 0;" tapmode onclick="open_win('goods_evaluate','goods_evaluate.html',false)">
							<div>
							<strong class="aui-font-size-13 aui-padded-l-5 aui-text-default goods-info-title">评价晒单</strong>
					  	</div>
							<div>
								<img style="height: 1.1rem;" src="../../image/btn/btn-right.png" />
							</div>
						</div>
						<div v-for="vo in goodsinfo.comment" class="goods-ping-list">
							<div class="aui-info" style="padding: 0.5rem 0.25rem;">
								<div>
									<img class="aui-img-round" style="height: 1.5rem;" :src="vo.avatar" />
									<span class="aui-font-size-13 aui-text-default aui-padded-l-10" style="line-height: 1.5rem;">{{vo.nickname}}</span>
								</div>
								<div>
									<img class="ping-star" src="../../image/icon/icon-star-active.png" />
									<!--2星-->
									<img v-if="vo.star_num<2" class="ping-star" src="../../image/icon/icon-star.png" />
									<img v-if="vo.star_num>1" class="ping-star" src="../../image/icon/icon-star-active.png" />
									<!--3星-->
									<img v-if="vo.star_num<3" class="ping-star" src="../../image/icon/icon-star.png" />
									<img v-if="vo.star_num>2" class="ping-star" src="../../image/icon/icon-star-active.png" />
									<!--4星-->
									<img v-if="vo.star_num<4" class="ping-star" src="../../image/icon/icon-star.png" />
									<img v-if="vo.star_num>3" class="ping-star" src="../../image/icon/icon-star-active.png" />
									<!--5星-->
									<img v-if="vo.star_num<5" class="ping-star" src="../../image/icon/icon-star.png" />
									<img v-if="vo.star_num>4" class="ping-star" src="../../image/icon/icon-star-active.png" />
								</div>
							</div>
							<div class="aui-font-size-13 ming-text-hui aui-padded-l-5">
								<span class="aui-padded-r-5">{{vo.create_time}}</span>
								<span class="aui-padded-r-5">{{vo.good_sku}}</span>
								<!--<span class="aui-padded-r-5">38码</span>-->
							</div>
							<div class="aui-font-size-14 aui-text-default" style="padding: 0.5rem 0.25rem;">
								{{vo.content}}
							</div>
							<div class="aui-row aui-row-padded">
								<div v-for="item in vo.img" class="aui-col-xs-4">
									<img class="aui-img-round-5" :src="item" />
								</div>
							</div>
							<div v-if="vo.remark!=''" class="shop-comment">
								<strong>官方回复：</strong>
								<span>{{vo.remark}}</span>
							</div>
						</div>
						<div v-if="goodsinfo.comment_num>1" class="aui-text-center" tapmode onclick="open_win('goods_evaluate','goods_evaluate.html',false)">
							<div class="aui-btn aui-btn-outlined" style="color: #690078;border-color: #690078;border-radius: 1.3rem;margin: 1rem 0;">查看全部评价</div>
						</div>
					</div>
					<div class="ming-bg-white goods-detail aui-padded-l-15 aui-padded-r-15" style="padding-bottom: 3rem;transform:translateY(.5rem);">
						<span style="display:inline-block;width:.1rem;height:.7rem;background:#333333;"></span>
						<span style="display:inline-block;width:.05rem;height:.6rem;background:#333333;transform:translate(-.1rem,-.1rem);"></span>
						<div class="aui-text-left aui-font-size-17" style="padding-top: 1rem;padding-bottom: 0.75rem;display:inline-block;font-weight:bolder;">
							商品详情
						</div>
						<div v-html="goodsinfo.content"></div>
					</div>
				</div>

				<div>
					<div v-show="type=='tuan'" id="aui-footer" class="aui-bar aui-bar-tab" style="display:inline-block;transform:translateY(.5rem);">
						<!-- 客服 事件未绑定 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="openmeiQia()">
							<!-- <img src="../../image/btn/btn-kefu.png" /> -->
							<span class="iconfont" style="color:#666666;font-size:1rem;transform:translate(.9rem,-.25rem);display:inline-block;">&#xe646;</span>
							<div class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-.6rem,.75rem);">客服</div>
						</div>
						<!-- 收藏 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="fav_good()">
							<!-- <img v-if="goodsinfo.is_collect=='0'" src="../../image/icon/icon-fav.png" />
							<img v-if="goodsinfo.is_collect=='1'" src="../../image/icon/icon-fav-active.png" /> -->

							<span v-if="goodsinfo.is_collect=='0'" class="iconfont" style="color:#666666;font-size:20px;transform:translate(.3rem,-.25rem);display:inline-block;">&#xe61b;</span>
							<span v-if="goodsinfo.is_collect=='1'" class="iconfont" style="font-size:1rem;transform:translate(.6rem,-.25rem);display:inline-block;color:#6BB4FF">&#xe630;</span>

							<div v-if="goodsinfo.is_collect=='0'" class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.2rem,.75rem);">收藏</div>
							<div v-if="goodsinfo.is_collect=='1'" class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.2rem,.75rem);">已收藏</div>

							<!-- <div v-if="goodsinfo.is_collect=='0'" class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">收藏</div>
							<div v-if="goodsinfo.is_collect=='1'" class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">已收藏</div> -->
						</div>
						<!-- 购物车 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="openTocart()">
							<!-- <img src="../../image/btn/btn-cart.png" />
							<div class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">购物车</div> -->
							<span class="iconfont" style="color:#666666;font-size:1rem;transform:translate(.1rem,-.25rem);display:inline-block;">&#xe600;</span>
							<div class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.65rem,.75rem);">购物车</div>
						</div>
						<div tapmode @click="if(vm.loginout) {openWin_login();return;};is_cart=false;attr_show=true;is_tuan=false" class="aui-bar-tab-item ming-bg-white aui-font-size-13 aui-border-t" style="color: #FFf;padding-top: 5px;background:linear-gradient(135deg,rgba(227,234,86,1) 0%,rgba(162,225,58,1) 100%,rgba(122,174,229,1) 100%);border-radius:5rem 0px 0px 5rem;transform:translate(-.6rem,.3rem);">
							<div>
								<!--这里要返回不参团的价格-->
								￥{{goodsinfo.current_price}}
							</div>
							<div>
								单独购买
							</div>
						</div>
						<div v-if="goodsinfo.is_join_tuan=='1'" tapmode @click="if(vm.loginout) {openWin_login();return;};is_cart=false;attr_show=true;is_tuan=true" class="aui-bar-tab-item aui-bg-linear ming-text-white aui-font-size-12" style="padding-top: .25rem;border-radius:0 5rem 5rem 0;transform:translate(-.6rem,.3rem);">
							我要开团
						</div>
						<div v-if="goodsinfo.is_join_tuan=='0'" tapmode onclick="openSharebox_tuan()" class="aui-bar-tab-item aui-bg-linear ming-text-white aui-font-size-12" style="padding-top: .25rem;border-radius:0 5rem 5rem 0;transform:translate(-.6rem,.3rem);">
							邀请好友参团
						</div>
					</div>
					<div v-show="type!='tuan'" id="aui-footer2" class="aui-bar aui-bar-tab" style="padding-bottom:1rem;">
						<!-- 客服 事件未绑定 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="openmeiQia()">
							<!-- <img src="../../image/btn/btn-kefu.png" /> -->
							<span class="iconfont" style="color:#666666;font-size:20px;transform:translate(.6rem,-.25rem);display:inline-block;">&#xe646;</span>
							<div class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-.9rem,.75rem);">客服</div>
						</div>
						<!-- 收藏 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="fav_good()">
							<!-- <img v-if="goodsinfo.is_collect=='0'" src="../../image/icon/icon-fav.png" />
							<img v-if="goodsinfo.is_collect=='1'" src="../../image/icon/icon-fav-active.png" /> -->

							<span v-if="goodsinfo.is_collect=='0'" class="iconfont" style="color:#666666;font-size:1rem;transform:translate(0rem,-.25rem);display:inline-block;">&#xe61b;</span>
							<span v-if="goodsinfo.is_collect=='1'" class="iconfont" style="font-size:1rem;transform:translate(.3rem,-.25rem);display:inline-block;color:#6BB4FF">&#xe630;</span>

							<div v-if="goodsinfo.is_collect=='0'" class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.45rem,.75rem);">收藏</div>
							<div v-if="goodsinfo.is_collect=='1'" class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.45rem,.75rem);">已收藏</div>

							<!-- <div v-if="goodsinfo.is_collect=='0'" class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">收藏</div>
							<div v-if="goodsinfo.is_collect=='1'" class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">已收藏</div> -->
						</div>
						<!-- 购物车 -->
						<div class="aui-bar-tab-item" style="width: 0.8%;" tapmode onclick="openTocart()">
							<!-- <img src="../../image/btn/btn-cart.png" />
							<div class="aui-bar-tab-label aui-font-size-12" style="color: #666666;">购物车</div> -->
							<span class="iconfont" style="color:#666666;font-size:1rem;transform:translate(-.2rem,-.25rem);display:inline-block;">&#xe600;</span>
							<div class="aui-font-size-12" style="color:#666666;display:inline-block;padding-left:.2em;transform:translate(-1.95rem,.75rem);">购物车</div>
						</div>


						<div tapmode @click="if(vm.loginout) {openWin_login();return;};is_cart=true;attr_show=true" class="aui-bar-tab-item  aui-font-size-13" style="color: #FFf;padding-top: .25rem;background: #005A93;border-radius:5rem;transform:translate(-.9rem,.3rem);">
							加入购物车
						</div>
						<div v-if="type!='miao'||goodsinfo.sold_per<100" tapmode @click="if(vm.loginout) {openWin_login();return;};is_cart=false;attr_show=true" class="aui-bar-tab-item aui-bg-linear ming-text-white aui-font-size-13" style="padding-top: .25rem;background: #F73024;border-radius:5rem;transform:translate(-.9rem,.3rem);left: 0.3rem;">
							立即购买
						</div>
						<div v-if="type=='miao'&&goodsinfo.sold_per==100" class="aui-bar-tab-item aui-bg-linear ming-text-white aui-font-size-13" style="padding-top: .25rem;transform:translate(-.9rem,.3rem);background:linear-gradient(135deg,rgba(132,229,255,1) 0%,rgba(107,180,255,1) 100%,rgba(122,174,229,1) 100%);border-radius:0px 5rem 5rem 0px;">
							已售空
						</div>
					</div>
				</div>

				<!-- 查看全部弹窗 -->
				<div v-if="detial_show">
					<div class="aui-mask aui-mask-in" style="z-index: 991;" tapmode @click="detial_show=false"></div>
					<div class="ming-bg-white" style="padding: 0 0.5rem;position: fixed;bottom: 0;width: 100%;z-index: 992;">
						<img tapmode @click="detial_show=false" style="position: absolute;height: 1.1rem;left: 0.5rem;top: 1.25rem;" src="../../image/btn/btn-close-hui.png" />
						<div class="aui-text-center" style="padding: 1.25rem 0;border-bottom:1px solid rgba(0,0,0,.1);margin-bottom:15px;">
							<span style="color:#323233;font-size:.8rem;font-weight:bolder;">
							全部拼团
						</span>
						</div>
						<div style="overflow-y: scroll;height: 60vh;">
							<div>
								<div v-for="vo in goodsinfo.service_name" class="aui-info" style="padding-top: 0;padding-bottom: 1.5rem;align-items: flex-start;">
									<div>
										<img style="height: 1.1rem;display: inline-block;" src="../../image/icon/icon-success-red.png" />
									</div>
									<div class="ming-text-hui" style="flex:1;padding-left: 0.75rem;display: block;">
										<div class="aui-font-size-14 aui-margin-b-15" style="font-weight:bolder;color:#333333;">
											{{vo.service_name}}
										</div>
										<div class="aui-font-size-13" style="color:#333333;">
											{{vo.intro}}
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>



				<!--基础保障弹窗-->
				<div v-if="serve_show">
					<div class="aui-mask aui-mask-in" style="z-index: 991;" tapmode @click="serve_show=false"></div>
					<div class="ming-bg-white" style="padding: 0 0.5rem;position: fixed;bottom: 0;width: 100%;z-index: 992;">
						<img tapmode @click="serve_show=false" style="position: absolute;height: 1.1rem;right: 0.5rem;top: 1.25rem;" src="../../image/btn/btn-close-hui.png" />
						<div class="aui-text-center" style="padding: 1.25rem 0;border-bottom:1px solid rgba(0,0,0,.1);margin-bottom:15px;">
							<span style="color:#323233;font-size:.8rem;font-weight:bolder;">
							基础保障
						</span>
						</div>
						<div style="overflow-y: scroll;height: 60vh;">
							<div>
								<div v-for="vo in goodsinfo.service_name" class="aui-info" style="padding-top: 0;padding-bottom: 1.5rem;align-items: flex-start;">
									<div>
										<img style="height: 1.1rem;display: inline-block;" src="../../image/icon/icon-success-red.png" />
									</div>
									<div class="ming-text-hui" style="flex:1;padding-left: 0.75rem;display: block;">
										<div class="aui-font-size-14 aui-margin-b-15" style="font-weight:bolder;color:#333333;">
											{{vo.service_name}}
										</div>
										<div class="aui-font-size-13" style="color:#333333;">
											{{vo.intro}}
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>


				<!--加入购物车弹窗-->
				<div v-if="attr_show">
					<div class="aui-mask aui-mask-in" style="z-index: 991;" tapmode @click="attr_show=false" @touchmove.prevent></div>
					<div class="ming-bg-white" style="padding: 0 0.5rem;position: fixed;bottom: 0;width: 100%;z-index: 992;padding-bottom: 2.2rem;max-height: 80%;">
						<img tapmode @click="attr_show=false" style="position: absolute;height: 1.1rem;right: 0.5rem;top: .8rem;" src="../../image/btn/btn-close-hui.png" />
						<img class="aui-img-round-5" style="position: absolute;height: 4.5rem;left: 0.5rem;top: 1.0rem;" :src="goodsinfo.cover" />
						<!-- 商品图片 价位 库存 已选择 -->
						<div style="padding: 0.8rem 0;margin-bottom: 0.5rem;margin-top:1rem;">
							<div style="padding-left: 5.25rem;">
								<div style="color: #FF6642;padding-left: 0.5rem;margin-left:-.75rem;margin-top:-.8rem;">
									<span class="aui-font-size-18">￥{{price}}</span>
								</div>
								<div class=" aui-font-size-13" style="margin-left:-.1rem;color:#969699;">
									<span style="display:inline-block;transform:translateY(.75rem);">库存:&nbsp {{kucun}}</span><br>
									<span class="aui-padded-r-5" style="display:inline-block;transform:translateY(1.25rem);">已选择:&nbsp <span v-for="vo in good_sku_view">{{vo}} </span></span>
								</div>
							</div>
						</div>

						<div style="height: 13rem;overflow-y: scroll;">
							<div v-for="(vo,index) in goodSku.good_attr" style="padding-top: .5rem;">
								<div class="aui-font-size-14 aui-margin-b-15 aui-text-default">
									{{vo.name}}
								</div>
								<div class="aui-font-size-12">
									<span v-for="item in vo.sub" class="attr-tag" :class="{'active':item==good_sku_view[index]}" tapmode @click="$set(good_sku_view,index,item)" >{{item}}</span>
								</div>
							</div>
						</div>

						<!-- 添加购买数量 -->
						<div class="aui-info" style="padding-bottom: 1.75rem;">
							<div class="aui-font-size-16 aui-text-default" style="display:inline-block;transform:translateY(-4.5rem)">
								购买数量
							</div>
							<div class="aui-font-size-14 aui-padded-10" style="display:inline-block;height:2.5rem;transform:translate(-10.25rem,-2.6rem);">
								<div tapmode @click="if(count<2)return;count-=1;" class="aui-text-center aui-btn-plus" style="float:left;border:1px solid #e1e1e5;width:2rem;height:2rem;line-height:2rem;">
									-
								</div>
								<div class="aui-text-center aui-text-default" style="float:left;border:1px solid #e1e1e5;width:2.5rem;height:2rem;line-height:2rem;border-left:0;border-right:0;">
									{{count}}
								</div>
								<div tapmode @click="if(count>=kucun){count=kucun;return;};count+=1" class="aui-text-center aui-btn-plus" style="float:left;border:1px solid #e1e1e5;width:2rem;height:2rem;line-height:2rem;">
									+
								</div>
							</div>
						</div>
					</div>

					<!-- 点击"确定"购买 -->
					<div tapmode @click="if(kucun==0)return;attr_show=false;createGoodCart()" class="aui-btn aui-btn-block ming-text-white" :class="{'aui-bg-linear':kucun>0}" style="position: fixed;bottom: -1rem;width: 90%;z-index: 999;height: 2.5rem;line-height: 2.5rem;border-radius: 5rem;transform:translate(-50%,-1.8rem);margin-left:50%;">
						确定
					</div>

				</div>
				<div v-show="share_show" class="aui-mask aui-mask-in">
					<div class="aui-text-center" style="width: 11rem;height: 155px;margin-left: calc(50vw - 110px);margin-top: calc(50vh - 78px);position: relative;">
						<img style="width: 11rem;height: 7.75rem;" src="../../image/bg/bg-share-gold.png" />
						<div style="position: absolute;width: 100%;bottom: 1.35rem;">
							<span style="font-size: 1.5rem;padding-bottom: .85rem;">+{{share_gold}}</span>
							<p class="ming-text-hui aui-font-size-13">恭喜您获得商城币奖励</p>
						</div>
					</div>
				</div>
			</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/swiper.min.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-sharebox.js"></script>
<script>
	var vm = new Vue({
		el: '#app',
		data: {
			id: 0,
			index: 0,
			scrolled: false,
			serve_show: false,

			detial_show: false,

			attr_show: false,
			good_sku_view: [],
			type: 'good', //'good'普通商品falg-2,'tuan'团购商品falg-4，'miao'秒杀商品falg-3，对应返回的page字段
			goodsinfo: {},
			goodSku: {},
			count: 1,
			is_cart: false,
			is_tuan: false,
			now_time: Date.parse(new Date()) / 1000,
			share_pic: '',
			pic_done: false,
			loginout: false,
			share_show: false,
			share_gold: 0
		},
		methods: {
			get_goodSku: function() {
				get_data('api/Good/goodSku', {
					good_id: vm.id
				}, function(ret) {
					if (ret.status) {
						vm.goodSku = ret.data
					}
				})
			},
			goodDetails: function() {
				get_data('api/Good/goodDetails', {
					token: $api.getStorage('token'),
					good_id: vm.id
				}, function(ret) {
					if (ret.status) {
						vm.type = ret.data.page
						if (vm.type == 'tuan') {
							$api.fixTabBar($api.byId('aui-footer'))
						} else {
							$api.fixTabBar($api.byId('aui-footer2'))
						}
						vm.goodsinfo = ret.data
						vm.good_sku_view = ret.data.good_sku_view
						swiper_init()
						if (!vm.goodsinfo.cover) {
							vm.share_pic = '../../image/logo.jpg'
							vm.pic_done = true
						} else {
							download(vm.goodsinfo.cover, function(ret) {
								compress_pic(ret, function() {
									vm.share_pic = ret;
									vm.pic_done = true
								})
							})
						}
					} else {
						if (ret.msg == '商品已下架了44') {
							toast(ret.msg)
							send_event('goodsref')
							delay_close(600)
						}
					}
				})
			},
			price_format: function(type, price) {
				var status = (price + '').indexOf('.')
				if (status == '-1') {
					if (type == 'yuan') {
						return price;
					}
					if (type == 'fen') {
						return '00';
					}
				}
				var price_array = (price + '').split('.')
				if (type == 'yuan') {
					return price_array[0];
				}
				if (type == 'fen') {
					var price_fen = price_array[1].length < 2 ? price_array[1] + '0' : price_array[1];
					return price_fen;
				}
			},
			createGoodCart: function() {
				if (vm.loginout) {
					openWin_login();
					return;
				}
				if (this.count == '0') {
					toast('您当前选择的商品没有库存')
					return;
				}
				if (this.is_cart) {
					get_data('api/GoodCart/createGoodCart', {
						token: $api.getStorage('token'),
						good_id: this.id,
						good_num: this.count,
						good_sku: this.good_sku_view.join('|')
					}, function(ret) {
						toast(ret.msg)
						if (ret.status) {

						}
					})
				} else {
					var cost_price = vm.type == 'tuan' ? vm.goodsinfo.tuan_price : vm.goodsinfo.current_price;
					var flag = vm.type == 'good' ? 2 : vm.type == 'tuan' ? 4 : 3
					if (vm.type == 'tuan' && !vm.is_tuan) {
						cost_price = vm.goodsinfo.current_price
						flag = 2
						log(111);
						log(cost_price)
					}
					$api.setStorage('goods_info', {
						info: [{
							good_id: vm.id,
							cover: vm.goodsinfo.cover,
							title: vm.goodsinfo.title,
							cost_price: cost_price,
							good_sku: vm.good_sku_view.join('|'),
							good_num: vm.count
						}]
					})
					if (flag == 4) {
						$api.setStorage('tuan_id', vm.goodsinfo.tuan_id)
					}
					if (flag == 3) {
						$api.setStorage('miao_id', vm.goodsinfo.miao_id)
					}
					$api.setStorage('flag', flag)
					openWin_create_order()
				}
			},
			settime: function(time, nowtime) {
				var data = TimeCountDowns(time, nowtime);
				if (data != '0') {
					return '<span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">' + data.hours + '</span><span style="margin:0 .25rem">:</span><span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">' + data.minutes +
						'</span><span style="margin:0 .25rem">:</span><span style="width:1.5rem;background-color:#fff;color:#FF6642;padding:.25rem;">' + data.seconds + '</span>';
				} else {
					return '已结束';
				}
			},
			settime_tuan: function(time, nowtime) {
				//					需要返回天数
				var data = TimeCountDownfull(time, nowtime);
				if (data != '0') {
					if (data.days > 0) {
						return data.days + '天 ' + data.hours + ':' + data.minutes + ':' + data.seconds;
					}
					return data.hours + ':' + data.minutes + ':' + data.seconds;
				} else {
					return '已结束';
				}
			}
		},
		computed: {
			kucun: function() {
				var kucun = false;
				if (this.good_sku_view.length == 0) {
					return this.goodsinfo.stock_num;
				}
				if (this.good_sku_view.length != this.goodSku.good_attr.length) {
					vm.count = 0
					return 0;
				}
				var name = this.good_sku_view.join('|');
				this.goodSku.good_sku.forEach(function(el) {
					if (name === el.good_sku) {
						if (el.stock_num) {
							kucun = el.stock_num;
							vm.count = 1
						} else {
							kucun = 0
							vm.count = 0
						}
					}
				})
				if (!kucun) {
					kucun = 0
					vm.count = 0
				}
				return kucun;
			},
			price: function() {
				if (vm.is_tuan) {
					var price = this.goodsinfo.tuan_price * this.count;
				} else {
					var price = this.goodsinfo.current_price * this.count;
				}
				return price.toFixed(2);
			}
		},
		watch: {
			attr_show: function(a, b) {
				if (a == true) {
					var cssStr = "overflow-y: hidden; height: 100%;";
					document.getElementsByTagName('html')[0].style.cssText = cssStr;
					document.body.style.cssText = cssStr;
				} else {
					var cssStr = "overflow-y: auto; height: auto;";
					document.getElementsByTagName('html')[0].style.cssText = cssStr;
					document.body.style.cssText = cssStr;
				}
			}
		}
	})
	apiready = function() {
		$api.fixStatusBar($api.byId('aui-header'))
		vm.id = $api.getStorage('id')
		vm.goodDetails()
		vm.get_goodSku()
		authToken()
		setInterval(function() {
			vm.now_time = Date.parse(new Date()) / 1000
		}, 200)
		add_event('tuan_ref', function(ret) {
			vm.goodDetails()
			vm.get_goodSku()
		})
		add_event('logined', function(ret) {
			authToken()
			vm.goodDetails()
			vm.get_goodSku()
		})
		// fnInitPullRefresh(function() {
		// 		vm.goodDetails()
		// 		vm.get_goodSku()
		// 	})
			// 新版刷新
		refresh_new(function() {
			setTimeout(function() {
				vm.goodDetails()
				vm.get_goodSku()
				init()
				api.refreshHeaderLoadDone()
			}, 1000)
		})


	};

	function authToken() {
		get_data('api/login/isToken', {
			token: $api.getStorage('token')
		}, function(ret) {
			if (ret.status == '0') {
				vm.loginout = true
			}
			if (ret.status == '1') {
				vm.loginout = false
			}
		})
	}

	function tapindex(index) {
		if (vm.index != index) {
			vm.index = index
			var header_h = 45;
			if (index == 0) {
				document.documentElement.scrollTop = $api.offset($api.dom('.goods-info')).t - header_h
				document.body.scrollTop = $api.offset($api.dom('.goods-info')).t - header_h
			}
			if (index == 1) {
				document.documentElement.scrollTop = $api.offset($api.dom('.goods-ping')).t - header_h
				document.body.scrollTop = $api.offset($api.dom('.goods-ping')).t - header_h
			}
			if (index == 2) {
				document.documentElement.scrollTop = $api.offset($api.dom('.goods-detail')).t - header_h
				document.body.scrollTop = $api.offset($api.dom('.goods-detail')).t - header_h
			}
		}
	}

	function swiper_init() {
		setTimeout(function() {
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationType: 'fraction',
				autoplay: false, //可选选项，自动滑动
				loop: true, //可选选项，是否循环
				autoplayDisableOnInteraction: false, //注意此参数，默认为true
				mode: 'horizontal',
				freeMode: false,
				followFinger: false,
				observer: true, //修改swiper自己或子元素时，自动初始化swiper
				observeParents: true, //修改swiper的父元素时，自动初始化swiper
			});
		}, 50)
	}
	window.onscroll = function() {
			//变量t是滚动条滚动时，距离顶部的距离
			var t = document.documentElement.scrollTop || document.body.scrollTop;
			var header_h = $api.offset($api.byId('aui-header')).h
			var goods_info_height = $api.offset($api.dom('.goods-info')).t //- header_h - 2
			var goods_ping_height = $api.offset($api.dom('.goods-ping')).t - header_h //
			var goods_detail_height = $api.offset($api.dom('.goods-detail')).t - header_h //
			if (t > goods_info_height) {
				vm.scrolled = true
			} else {
				vm.scrolled = false
			}
			if (t > goods_info_height && t < goods_ping_height) {
				if (vm.index != 0) {
					vm.index = 0;
				}
			}
			if (t > goods_ping_height && t < goods_detail_height) {
				if (vm.index != 1) {
					vm.index = 1;
				}
			}
			if (t > goods_detail_height) {
				if (vm.index != 2) {
					vm.index = 2;
				}
			}
		}
		//		打开购物车
	function openTocart() {
		api.execScript({
			name: 'root',
			script: 'openTocart()'
		});
		closeToRoot()
	}
	//		关注商品
	function fav_good() {
		var status = vm.goodsinfo.is_collect
		opera(vm.id, 'good', 2, function(ret) {
			if (ret.status) {
				send_event('fav_ref')
				if (status == '1') {
					Vue.set(vm.goodsinfo, 'is_collect', '0')
					toast('取消收藏成功')
				} else {
					toast('收藏成功')
					Vue.set(vm.goodsinfo, 'is_collect', '1')
				}
			}
		})
	}
	//		我要开团
	function joinTuan() {
		get_data('api/Tuan/pinTuan', {
			token: $api.getStorage('token'),
			tuan_id: vm.goodsinfo.tuan_id,
			good_id: vm.id,
		}, function(ret) {
			if (ret.status) {
				openWin_pintuan_details(ret.data.id)
				setTimeout(function() {
					close_win()
				}, 1000)
			}
		})
	}
	var sharebox;

	function openSharebox() {
		if (!$api.getStorage('token')) {
			openWin_login()
			return;
		}
		if (sharebox && sharebox.maskDiv) {
			sharebox.close();
			return;
		}
		sharebox = new auiSharebox();
		sharebox.init({
			frameBounces: true, //当前页面是否弹动，（主要针对安卓端）
			buttons: [{
				image: '../../image/btn/btn-weixin.png',
				text: '微信好友',
				value: 'wx' //可选
			}, {
				image: '../../image/btn/btn-weixin-2.png',
				text: '朋友圈',
				value: 'wx-circle'
			}],
			col: 3,
			shareTitle: '分享到' //可选,当然也可以采用下面的方式使用图标
		}, function(ret) {
			if (ret) {
				console.log(ret.buttonIndex + '/' + ret.buttonValue)
				if (ret.buttonIndex == 1) {
					shareTowx('session')
				}
				if (ret.buttonIndex == 2) {
					shareTowx('timeline')
				}
				if (ret.buttonIndex == 3) {
					shareTowb()
				}
			}
		})
	}

	function openSharebox_tuan() {
		var sharebox = new auiSharebox();
		sharebox.init({
			frameBounces: true, //当前页面是否弹动，（主要针对安卓端）
			buttons: [{
				image: '../../image/btn/btn-weixin.png',
				text: '微信好友',
				value: 'wx' //可选
			}, {
				image: '../../image/btn/btn-weixin-2.png',
				text: '朋友圈',
				value: 'wx-circle'
			}],
			col: 3,
			shareTitle: '邀请好友参团' //可选,当然也可以采用下面的方式使用图标
		}, function(ret) {
			if (ret) {
				console.log(ret.buttonIndex + '/' + ret.buttonValue)
				if (ret.buttonIndex == 1) {
					shareTowx('session')
				}
				if (ret.buttonIndex == 2) {
					shareTowx('timeline')
				}
				if (ret.buttonIndex == 3) {
					shareTowb()
				}
			}
		})
	}

	function shareTowx(type) {
		var contentUrl = 'http://zm.zonmay.com/wap/share/goods/id/' + vm.id + '.html'
		var title = vm.goodsinfo.title
		var wx = api.require('wxPlus');
		wx.isInstalled(function(ret, err) {
			if (ret.installed) {} else {
				toast('当前设备未安装微信客户端');
				return;
			}
		});
		wx.shareWebpage({
			scene: type,
			title: title,
			description: title,
			contentUrl: contentUrl,
			thumb: vm.share_pic
		}, function(ret, err) {
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token')
				}, function(ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						setTimeout(function() {
							vm.share_show = false
						}, 3000)
					}
				})
			} else {
				if (err.code == '2') {
					toast('取消分享');
				}
				console.log(err.code);
			}
		});
	}

	function shareTowb() {
		var contentUrl = 'http://zm.zonmay.com/wap/share/goods/id/' + vm.id + '.html'
		var title = vm.goodsinfo.title
		var weibo = api.require('weiboPlus');
		weibo.shareWebPage({
			text: title + '。详情点击链接查看',
			title: title,
			description: title,
			thumb: vm.share_pic,
			contentUrl: contentUrl
		}, function(ret, err) {
			console.log(JSON.stringify(ret))
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token')
				}, function(ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						setTimeout(function() {
							vm.share_show = false
						}, 3000)
					}
				})
			} else {
				if (err.code == '1') {
					toast('取消分享');
				}
				console.log(JSON.stringify(err))
			}
		});
	}
</script>

</html>
